



            

            var _LoadingHtml = '';
            //呈现loading效果

            document.write(_LoadingHtml);

            //监听加载状态改变
            document.onreadystatechange = completeLoading;

            //加载状态为complete时移除loading效果
            function completeLoading() {
                if (document.readyState == "complete") {
                    var loadingMask = document.getElementById('loadingDiv');
                    loadingMask.parentNode.removeChild(loadingMask);
                    
                }
                //if(window.history.length <= 1 || performance.navigation.type == 1){
                if(!sessionStorage.first || performance.navigation.type == 1){
                    sessionStorage.setItem('first',true);
                    $('.beginning').removeClass('none');
                    $('.leaving').addClass('none');
                    setTimeout(function(){
                        $('.beginning').addClass('first');
                        $('.container').addClass('first');
                        $('.leaving').addClass('disappear');
                        $('.leaving').removeClass('none');
                    },10);
                    if(window.location.href.indexOf('projects') >= 0){
                        setTimeout(function(){
                            $('main .projects .content .chooseMenu').addClass('pointer');
                        },3800);
                        setTimeout(function(){
                            $('.beginning.btm').css('transition','initial');
                        },3860);
                        $('.leaving').addClass('first');
                        setTimeout(function(){
                            $('main .projects .content .txt p:first-child').addClass('current');
                            $('main .projects .content .txt p:first-child').addClass('toTop');
                        },3500);
                    }
                    if(window.location.href.indexOf('contact') >= 0){
                        setTimeout(function(){
                            $('main .contact .content .btm .addr').addClass('complete');
                        },6100);
                    }
                    
                }else{
                    //else if(window.history.length > 2 || performance.navigation.type != 1){  
                    $('.leaving').addClass('disappear');
                    $('.container').addClass('start');
                    if(window.location.href.indexOf('projects') >= 0 && window.innerWidth >= 768){
                        setTimeout(function(){
                            $('main .projects .content .chooseMenu').addClass('pointer');
                            $('.leaving.btm').css('transition','initial');
                        },1200);
                        setTimeout(function(){
                            $('main .projects .content .txt p:first-child').addClass('current');
                            $('main .projects .content .txt p:first-child').addClass('toTop');
                        },800);
                    }
                    if(window.location.href.indexOf('contact') >= 0){
                        setTimeout(function(){
                            $('main .contact .content .btm .addr').addClass('complete');
                        },3000)
                    }
                }
                if(window.location.href.indexOf('index') >= 0){
                    $('.leaving.btm').addClass('over');
                }
            }
            